<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script type="module">
    // es6模块化，import 和 export 
    // 1. 通用导入方式 
    // 引入m1模块
    import * as m1 from "./src/js/m1.js"
    console.log('m1', m1.school)
    // 引入m2模块
    import * as m2 from "./src/js/m2.js"
    console.log('m2', m2.school)
    // 引入m3模块
    import * as m3 from "./src/js/m3.js"
    console.log('m3', m3.default.school)

    // 2. 解构赋值导入方式 
    import {school, teach} from "./src/js/m1.js"
    console.log(school)
    import {school as guigu, teach as tc} from "./src/js/m2.js"
    console.log(guigu)
    import {default as obj} from "./src/js/m3.js"
    console.log(obj.school)

    // 3. 简便形式导入，只针对default导出
    import m33 from "./src/js/m3.js"
    console.log(m33.school)


</script>
</html>